#ifndef MAINDIALOG_H
#define MAINDIALOG_H

#include <QDialog>
#include <QTcpServer>
#include <QDateTime>

#include "tcpserver.h"
// #include "../common/message.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainDialog;
}
QT_END_NAMESPACE

class MainDialog : public QDialog
{
    Q_OBJECT

public:
    MainDialog(QWidget *parent = nullptr);
    ~MainDialog();

public slots:
    void serverStatusChange(Message*);
    // void broadcast(Message*);

private:
    Ui::MainDialog *ui;
    int port{8000};
    TcpServer *server;
    void addLog(QString);

};
#endif // MAINDIALOG_H
